import axios from 'axios'

export async function getUserRole(userId){
    var resp =await axios.get("/api/petSystem/userRole.do",{
        params:{
            method:"getRoleByUserId",
            userId
        }
    })
    console.log("========getUserRole========");
    console.log(resp.data);
    return resp.data;
}

export async function getRoleThrone(roleId){
    var resp =await axios.get('/api/petSystem/roleThrone.do',{
        params:{
            method:'getThroneByRoleId',
            roleId
        }
    })
    console.log("========getRoleThrone========");
    console.log(resp.data);
    return resp.data;
}

export async function getThrone(throneId){
    var resp =await axios.get("/api/petSystem/throne.do",{
        params:{
            method:"getThroneById",
            throneId
        }
    })
    console.log("========getThroneById========");
    console.log(resp.data);
    return resp.data;
}
export async function getThroneListByIdStr(throneIdStr){
    var resp =await axios.get("/api/petSystem/throne.do",{
        params:{
            method:"getThroneListByIdStr",
            throneIdStr
        }
    })
    console.log("========getThroneListByIdStr========");
    console.log(resp.data);
    return resp.data;
}